//
//  EJSHomeGoodCollectionViewCell.h
//  FlyFish
//
//  Created by 海丰丛 on 2019/4/7.
//  Copyright © 2019 lifayu. All rights reserved.
//

#import <UIKit/UIKit.h>
@class EJSGoodsModel, XOShoppingCartModel,XOShoppingCartListModel;

NS_ASSUME_NONNULL_BEGIN

@protocol EJSHomeGoodCollectionViewCellDelegate <NSObject>

- (BOOL)homeGoodCellIsLogin;
- (void)homeGoodUpdateShopCartWith:(XOShoppingCartModel *)cartListModel;
- (void)homeGoodCellWillShowCartView: (XOShoppingCartModel *)cartModel andCurrentSpuId: (NSString *)spuId;

@end

@interface EJSHomeGoodCollectionViewCell : UICollectionViewCell

@property (weak, nonatomic) IBOutlet UIView *coverView;
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *udLabel;
@property (weak, nonatomic) IBOutlet UIView *bottomView;
@property (weak, nonatomic) IBOutlet UIView *bottomCartView;
@property (weak, nonatomic) IBOutlet UILabel *cartNumberLabel;
@property (weak, nonatomic) IBOutlet UIView *bottomToolView;

@property (weak, nonatomic) IBOutlet UIButton *addButton;
@property (weak, nonatomic) IBOutlet UIButton *reAddButton;
@property (weak, nonatomic) IBOutlet UIButton *deleteButton;
@property (weak, nonatomic) IBOutlet UIButton *removeButton;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *cartViewHeightConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *addButtonLeftConstraint;

/// data
@property (nonatomic, strong) EJSGoodsModel *goodModel;

@property (nonatomic, assign) NSInteger goodInCartNumber;
@property (strong, nonatomic) XOShoppingCartModel *shoppingCartListModel;

/// delegate
@property (nonatomic, weak) id<EJSHomeGoodCollectionViewCellDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
